package springbootpackage;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import bean.User;
import bean.YamlBean;

@RestController
@RequestMapping("/obj")
//多个类同时注解
@EnableConfigurationProperties({User.class,YamlBean.class})
public class ExampleObjectController {

	@Autowired
	private User user;
	
	@Autowired
	private YamlBean yamlBean;
	
	@RequestMapping("/")
	public String getContent(){
		return user.toString() + "------" + yamlBean.toString();
	}
}
